Cannot obtain Attribute Features values

Simple task. Need to obtain the current Attribute Features settings (true or false) for all user-defined attributes in a module.

When using the following code, all is well for ad.inherit, but incorrect arguments for (.) is raised for changeBars, date, and history

Could someone please tell me what I'm missing?
 

Module m = current
Object o
string objAttrName = "", results = ""
AttrDef ad
AttrType at
 
for objAttrName in (current Module) do {
ad = find(current Module, objAttrName )
results = "\t\tInherit - " ad.inherit ""
results =  "\t\tChange Bars - " ad.changeBars ""
results =  "\t\tDate - " ad.date ""
results =  "\t\tHistory - " ad.history ""

dedawson - Mon Jul 16 20:21:50 EDT 2012

Re: Cannot obtain Attribute Features values
adevicq - Tue Jul 17 03:17:07 EDT 2012

Hi,

Looking at the DXL help it appears that the attribute ids you use do not correspond to AttrDef attributes... (see the list at the top of the help page for AttrDef)
For example you have to use "nobars" instead of "changeBars".

Alain

Re: Cannot obtain Attribute Features values
dedawson - Tue Jul 17 11:18:13 EDT 2012

adevicq - Tue Jul 17 03:17:07 EDT 2012
Hi,

Looking at the DXL help it appears that the attribute ids you use do not correspond to AttrDef attributes... (see the list at the top of the help page for AttrDef)
For example you have to use "nobars" instead of "changeBars".

Alain

That's the ticket.
Many thanks
david

Re: Cannot obtain Attribute Features values
dedawson - Tue Jul 17 11:58:27 EDT 2012

dedawson - Tue Jul 17 11:18:13 EDT 2012
That's the ticket.
Many thanks
david

Heads up. When comparing the values stored in these AttrDef attributes with what you see in the Edit Attribute dialog, what you expect to see is not what you will get.

Assume all four of the Attribute features: check boxes are checked. A reasonable assumption would be that all four of the AttrDef attributes would be true. But remember, this is DOORS dxl.

The truth is, in such a scenario one will actually see:
Inherit - true
Change Bars - false
Date - false
History = false

This is because the AttrDef attributes associated with the Affect change bars, Affect change date and Generate history check boxes are defined as nobars, nochanges and nohistory, respectively. In other words, if the boxes are checked, the corresponding attributes are false. Meanwhile, the AttrDef attribute for Inherit value is simply inherit, so if it is checked, it is true. Helpful, huh? ;-{

Re: Cannot obtain Attribute Features values
llandale - Wed Jul 18 12:21:39 EDT 2012

Yup, it "doesn't not got no" history/bars/dates.